package com.hps.poet.controller;



import com.hps.poet.PoemDTO;
import com.hps.poet.entity.Poem;
import com.hps.poet.service.PoemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author HM
 * @since 2019-11-26
 */
@RestController
public class PoemController {

    @Autowired
    private PoemService poemService;


    /**
     * http://localhost:10016/hps/poetMysql/poemDTOList 网关
     * http://localhost:8086/poemDTOList 本地
     * @return
     */
    @GetMapping("/poemDTOList")
    public List<PoemDTO> poemDTOList() {
        return poemService.poemDTOList();
    }

}

